@extends('Admin.layout.layout')

        @section('content')
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">用户添加</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
     <div class="col-lg-6 col-lg-offset-3">

     @if (count($errors) > 0)
     <div class="alert alert-danger alert-dismissable">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
        <ul>
            @foreach ($errors->all() as $error)
             <li>{{ $error }}</li>
            @endforeach
        </ul> 
    </div>
	@endif
	 <form role="form" action="{{url('./admin/user/update')}}" method="post">
	 		<input type="hidden" name="id" value="{{$user -> id}}">
	    <div class="form-group">
	        <label>用户名</label>
	        <input class="form-control" type="text" name="name" placeholder="请输入6-15位用户名" value="{{$user->name}}">
	        <!-- <p class="help-block">请输入用户名</p> -->
	    </div>
	    <div class="form-group">
	        <label>邮箱</label>
	        <input class="form-control" type="text" name="email" placeholder="请输入邮箱" value="{{$user->email}}">
	    </div>
	    <div class="form-group">
	        <label>手机号</label>
	        <input class="form-control" type="text" name="phone" placeholder="请输入手机号" value="{{$user->phone}}">
	    </div>
	    {{csrf_field()}}	 
	    <center>
	    <button type="submit" class="btn btn-primary">提交</button>
	    </center>
	</form>  
	</div>
        @endsection
